package com.roc.web.listener;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;

import org.apache.log4j.Logger;

import com.roc.pojo.Operators;
import com.roc.util.constant.Constant;

/**
 * 
 *
 */
public class SessionListenerManage implements HttpSessionAttributeListener {
	private final static Logger logger=Logger.getLogger(SessionListenerManage.class);
	
	public void attributeAdded(HttpSessionBindingEvent event) { 
		/*String sessionAttrName=event.getName();
		Operators loginOperators=(Operators)event.getSession().getAttribute(Constant.SESSION_LOGIN_MERCHANT);
		if(loginOperators!=null){
			logger.info("############["+loginOperators.getAccountNo()+"]进行查询操作，创建  session ["+sessionAttrName+"]##############");
			
		}else{
			logger.info("############add to session ["+sessionAttrName+"]##############");
		}*/
	}   

	
	public void attributeRemoved(HttpSessionBindingEvent event) {
		String sessionAttrName=event.getName();
		
		logger.info("############remove atrr  ["+sessionAttrName+"]##############");
		
	}   
	
	
	public void attributeReplaced(HttpSessionBindingEvent event) {   
		
	}  

}
